#include<stdio.h>
int* masterMind(char* solution, char* guess, int* returnSize)
{
	int arr[2]={0,0};
	for(int i=0;i<4;i++)
	{
		if(solution[i]==guess[i])
		{
			arr[0]++;
			solution[i]='+';
			guess[i]='+';
		}		
	}
	for(int k=0;k<4;k++)
	{
		if(solution[k]=='+')
		{
			continue;
		}
		for(int j=0;j<4;j++)
		{
			if(guess[j]=='+')
			{
				continue;
			}
			if(guess[j]==solution[k])
			{
				guess[j]='+';
				solution[k]='+';
				arr[1]++;
				break;
			}
		}
	}
	return arr;
}
int main()
{
	char solution[5]="RGRB";
	char guess[5]="BBBY";
	int returnSize=0;
	int *arr=masterMind(solution,guess,&returnSize);
	printf("%d,%d",arr[0],arr[1]);
	return 0; 
} 
